// 单链表节点类
class Node {
    // 构造器：node → (数据域, 指针域)
    constructor(data = null, next = null) {
        this.data = data
        this.next = next 
    }
    // 返回描述字符串
    toString () {
        if(this.data === null) {
            return 'head'
        }
        else{
            return this.data + ""
        }
    }
}

module.exports = Node